<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>档案管理</title>
</head>
<body>
<form action="fileAction_searchFile" namespace="/" id="search" method="post">
		<p>账号<input type="text" name="id"/>
		<input type="submit" value="查找"/></p>
</form>
<!-- 	<a href="page/background/addUser.jsp"><input type="button" value="添加用户"class="btn btn-info"></a> -->
<!-- 	<a href="page/filesManagement/addFile.jsp"><input type="button" value="添加部门"class="btn btn-info"></a> -->
	<br>
	<table border="1" align="left">
		<thead>
			<tr>
			    <th>账号</th>
				<th>姓名</th>
				<th>密码</th>
				<th>性别</th>
				<th>职位</th>
				<th>部门</th>
				<th>员工编号</th>
				<th></th>
				<th></th>
				<th></th>
			</tr>
		</thead>
		<tbody>
		<s:hidden name="id" value="%{userId}"></s:hidden>
			<s:iterator value="usersList"  >
				<tr>
				    <td><s:property value="userId"/></td>
					<td><s:property value="userName" /></td>
					<td><s:property value="password" /></td>
					<td><s:if test="sex == 1">男</s:if><s:else>女</s:else></td>
					<td><s:property value="duty" /></td>
					<td><s:property value="department" /></td>
					<td><s:property value="employeeNumber" /></td>
					<td><s:form action="fileAction_showAddPage" namespace="/">
					<%// <s:set name="userId" value="<s:property value="userId" />"></s:set><!-- 设置自动应以标签 --> %>
					      <s:hidden name="userId" value="%{userId}"></s:hidden>
					      <input type="submit" value="添加/修改档案" />
					    </s:form>
					</td>
					<td><s:form action="fileAction_deleteUserFile" namespace="/">
					<%// <s:set name="userId" value="<s:property value="userId" />"></s:set><!-- 设置自动应以标签 --> %>
					      <s:hidden name="userId" value="%{userId}"></s:hidden>
					      <s:submit value="删除"/>
					    </s:form>
					</td>
					<td><s:form action="fileAction_showUserFile" namespace="/">
					<%// <s:set name="userId" value="<s:property value="userId" />"></s:set><!-- 设置自动应以标签 --> %>
					      <s:hidden name="userId" value="%{userId}"></s:hidden>
					      <s:submit value="查看详细"/>
					    </s:form>
					</td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
</body>
</html>